# Contributor: <xmingske@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gsoap
pkgver=2.8.122
pkgrel=0
arch="all"
pkgdesc="Cross-platform C and C++ SDK for SOAP/XML Web services"
license="GPL-2.0-or-later gSOAP-1.3b"
url="https://www.genivia.com/dev.html"
makedepends="autoconf automake bison flex openssl1.1-compat-dev libtool zlib-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://prdownloads.sourceforge.net/gsoap2/gsoap_$pkgver.zip
	gsoap-libtool.patch
	musl-fixes.patch
	"
builddir="$srcdir/$pkgname-${pkgver%.*}"

# secfixes:
#   2.8.113-r0:
#     - CVE-2021-21783

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--exec-prefix=/usr \
		--enable-ipv6 \
		--enable-c-locale
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
fc0b5d6bc5c606c8a24a3eef18a0a169d89dda599fb8767c8943984d0ade1c3e734cfff6c9bfe989778315863480a0b98a63a4e954738ec5a08618a60691c951  gsoap_2.8.122.zip
081217f40e193d0645cd2a196c880574901de38ef561a2d880b79c081c6cbba234b5496195ea6681cf6222d38ace8a31a5c21be3b34165f71c0c0a7ed8a8e2b5  gsoap-libtool.patch
020a98f4143ca6df2c3045d7303fe7166c6ef863039c53e38ea046dce9dfd58fae63986fd5e193ebbb23c4a3d495d19c8a811fbbde8e093a6e2363066a382814  musl-fixes.patch
"
